how to get sha256 value on macOS

openssl dgst -sha256 file
openssl sha1 file
openssl md5 file